/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




/* 
Overrides for module-specific theming. This file doesn't get registered anywhere in the app, and 
should therefore never contain CSS rules. The themebuild command will convert the template 
comments into CSS template rules.
*/


@mixin module-theme-override($moduleName) {
    div.page-title.#{$moduleName} {
        /* @theme background-color: background_#{$moduleName}_override */
        .x2-button {
            /* @theme background-color: background_#{$moduleName}_override */
            /* @theme color: smart_text_#{$moduleName}_override */
        }
        & > .summary > span + div {
            /* @theme background-color: background_#{$moduleName}_override */
        }
        & > h2,
        & > h2 > span,
        & > .summary > span,
        & > .summary > span > *,
        & > .record-aliases-dropdown-container > h2,
        & > span.icon,
        & > .vcrPager > .summary
        {
            /* @theme color: smart_text_#{$moduleName}_override */
        }
    }
    div.widget-title-bar.#{$moduleName} {
        /* @theme background-color: background_#{$moduleName}_override */
        .x2-button, .x2-icon-button {
            /* @theme background-color: background_#{$moduleName}_override */
            /* @theme color: smart_text_#{$moduleName}_override */
        }
        & > div {
            /* @theme color: smart_text_#{$moduleName}_override */
        }
        & + div .page-title {
            /* @theme background-color: background_#{$moduleName}_override */
            & > .summary > span > div {
                /* @theme background-color: background_#{$moduleName}_override */
            }
            & > .summary > span,
            & > .summary > span > *
            {
                /* @theme color: smart_text_#{$moduleName}_override */
            }
            .x2-button {
                /* @theme background-color: background_#{$moduleName}_override */
                /* @theme border-color: light_background_#{$moduleName}_override */
                /* @theme color: smart_text_#{$moduleName}_override */
            }
            .x2-button:hover, .x2-button:active {
                /* @theme background-color: light_background_#{$moduleName}_override */
                /* @theme border-color: lighter_background_#{$moduleName}_override */
            }
        }
    }
}

// generate theme override sass for each default module
@include module-theme-override('accounts');
@include module-theme-override('actions');
@include module-theme-override('calendar');
@include module-theme-override('contacts');
@include module-theme-override('users');
@include module-theme-override('docs');
@include module-theme-override('groups');
@include module-theme-override('x2Leads');
@include module-theme-override('marketing');
@include module-theme-override('media');
@include module-theme-override('opportunities');
@include module-theme-override('products');
@include module-theme-override('quotes');
@include module-theme-override('reports');
@include module-theme-override('charts');
@include module-theme-override('workflow');
@include module-theme-override('services');
@include module-theme-override('bugReports');
@include module-theme-override('emailInboxes');
@include module-theme-override('x2Activity');
